#include<iostream>
#include<algorithm>
#include<string>
#include<cstring>
#include<queue>
#include<vector>

using namespace std;
const int N = 300010, M = 900000;

int n;
int jump[N], slip[N], real[N];
int fa[N];
bool st[N];
int q[M];


bool bfs(int k){
    int hh = 0, tt = -1;
    q[++tt] = k;
    fa[k] = k;
    while(hh <= tt){
        // int cur = q.front();
        // q.pop();
        int cur = q[hh++];

        for (int i = jump[real[cur]]; i >= 0 ; i--)
        {
            if(st[real[cur] - i]) break;
            st[real[cur] - i] = true;
            fa[real[cur] - i] = cur;

            if(real[cur] - i == 0){
                return true;
            }

            // q.push(real[cur] - i);
            q[++tt] = real[cur] - i;
        }
    }

    return false;
}

void getdata(){
    cout << "gogogogo" << endl;
}

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);

    scanf("%d", &n);
    for (int i = 1; i <= n; i ++){
        scanf("%d", &jump[i]);
    }

    for (int i = 1; i <= n; i ++){
        scanf("%d", &slip[i]);
    }

    for (int i = 1; i <= n; i ++){
        if(i + slip[i] >= n){
            real[i] = n;
        }else{
            real[i] = i + slip[i];
        }
    }



    bool res = bfs(n);


    vector<int> ans;
    if(res){
        int kk = 0;
        ans.push_back(0);
        while(fa[kk] != n){
            ans.push_back(fa[kk]);
            kk = fa[kk];
        }

        reverse(ans.begin(), ans.end());

        printf("%d\n", ans.size());
        for (int i = 0; i < ans.size(); i ++){
            printf("%d ", ans[i]);
        }
    }else{
        printf("-1\n");
    }

    return 0;
}